package com.kili.recommend.data.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * <p>
 * 事件汇总
 * </p>
 *
 * @author fenny
 * @since 2019-08-27
 */
@Getter
@Setter
@TableName("kilimall_events")
public class Events implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableField("event")
    private String event;

    @TableField("user_id")
    private Long userId;

    @TableField("sku_id")
    private Long skuId;

    @TableField("num")
    private Integer num;


    public static final String EVENT = "event";

    public static final String USER_ID = "user_id";

    public static final String SKU_ID = "sku_id";

    public static final String NUM = "num";

    public String getKey() {
        StringBuilder builder = new StringBuilder(event);
        builder.append(".").append(userId).append(".").append(skuId);
        return builder.toString();
    }

}
